
objs = a.o b.o c.o
dep_files := $(patsubst %, .%.d,$(objs))
dep_files := $(wildcard $(dep_files))

CFLAGS = -Werror -Iinclude

tset:a.o b.o c.o
	gcc -o test $^

ifneq ($(dep_files),)
include $(dep_files)
endif

%.o:%.c
	gcc -c -o $@ $< -MD -MF .$@.d
	
clean:
	rm *.o test

distclean:
	rm $(dep_files)

.PHONY: clean


